// #ifndef VUE3
import Vue from 'vue'
// 引入vuex库
import Vuex from 'vuex'
// 使用vuex
Vue.use(Vuex)
 
import App from './App'
import http from './api/request.js'

import uView from '@/node_modules/uview-ui'
Vue.use(uView)
// 引入公共工具js
import utils from '@/utils/utils.js'
Vue.prototype.$utils = utils

// 引入公共上传组件
import upload from '@/utils/upload.js'
Vue.prototype.$upload = upload 

// 引用公共表单校验
import validate from '@/utils/validate.js'
Vue.prototype.$rules = validate

// 引入公共页面跳转组件
import pageChange from '@/utils/pageChange.js'
Vue.prototype.$pageUrl = pageChange

// 挂载公共弹出层组件
import popUpCom from '@/components/popUpCom.vue'
Vue.component('popUpCom', popUpCom)

// 引入公共提示框
import funToast from '@/utils/toast.js'
Vue.prototype.$funToast = funToast

// import uView from "@/plugin/uview-ui";
Vue.config.productionTip = false
Vue.prototype.$http = http
const msg = (title, duration = 2000, mask = false, icon = "none") => {
	if (Boolean(title) === false) {
		return
	}
	uni.showToast({
		title,
		duration,
		mask,
		icon
	})
}
Vue.prototype.$api = {
	msg
};
App.mpType = 'app'

const app = new Vue({
	...App
})
app.$mount()
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
import App from './App.vue'
export function createApp() {
	const app = createSSRApp(App)
	return {
		app
	}
}
// #endif